import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export default new VueRouter({
    mode: 'history',
    routes: [
        {
            path: '/',
            name: 'Main',
            redirect:'/home',
            component: () =>
                import('../pages/Main.vue'),
            children: [
                // {
                //     path: '/home',
                //     name: 'home',
                //     component: () =>
                //         import('../pages/home')
                // },
                // {
                //     path: '/user',
                //     name: 'user',
                //     component: () =>
                //         import('../pages/user')
                // },
                // {
                //     path: '/mall',
                //     name: 'mall',
                //     component: () =>
                //         import('../pages/mall')
                // },
                // {
                //     path: '/other/page1',
                //     name: 'page1',
                //     component: () =>
                //         import('../pages/other/pageOne.vue')
                // },
                // {
                //     path: '/other/page2',
                //     name: 'page2',
                //     component: () =>
                //         import('../pages/other/pageTwo.vue')
                // },
            ]
        },
        {
            path: '/login',
            name: 'login',
            component: () =>
                import('../pages/login')
        }

    ]
})